package com.lqk.facade.factory.absfactory.pizzastore.order;

import com.lqk.facade.factory.absfactory.pizzastore.pizza.BJCheesePizza;
import com.lqk.facade.factory.absfactory.pizzastore.pizza.BJGreekPizza;
import com.lqk.facade.factory.absfactory.pizzastore.pizza.Pizza;


/**
 * @author lqk
 * @date 2021/12/1 15:43
 *
 * 工厂子类
 */
public class BJFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheese".equals(orderType)){
            pizza = new BJCheesePizza();
        }else if ("greek".equals(orderType)){
            pizza = new BJGreekPizza();
        }
        return pizza;
    }
}
